﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using nplJobsCommon.Common;
using nplJobsCommon.JobSeeker;
using nplJobs.DB;
using System.Data;
//razib
namespace nplJobsDAL.Select
{
    public class SelectJobSeekerAll : DataAccessBase
    {
        public List<JobSeeker> GetJobSeeker()
        {
            try
            {
                CustomParameterList cpList = new CustomParameterList();
                cpList.Add(new CustomParameter("@ID", 1, DbType.Int32));

                object paramval = null;
               
                DBHelper db = new DBHelper();
                DataTable dt = db.ExecuteQueryToDataTable(cpList.ParameterNames, cpList.ParameterValues, cpList.ParameterTypes, ref paramval, null, "spSelectJobSeeker");

                List<JobSeeker> results = new List<JobSeeker>();
                foreach (DataRow dr in dt.Rows)
                {
                    JobSeeker objJobList = new JobSeeker();

                    MapperBase.GetInstance().MapItem(objJobList, dr); ;
                    results.Add(objJobList);
                }
                return results;

            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
    }
}
